package com.qf.profile.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qf.profile.entity.User;
import com.qf.profile.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author gp14
 * @since 2022-09-19
 */
@Controller
@RequestMapping("/profile/user")
public class UserController {

    @Autowired
    private IUserService iUserService;

    @GetMapping("/list")
    @ResponseBody
    public List<User> list(){
        List<User> list = iUserService.list();
        IPage<User> iPage = iUserService.customPage(1,5);
        return list;
    }


}
